The invention relates to a control unit for a motor vehicle, a programming unit and a programming system.
Modern motor vehicles have a plurality of program controlled control units. The control units usually comprise a program memory that can be programmed in an installed state of the control unit. In today's control units the program memory is often designed as a flash memory. Flash memories are non volatile memory components, wherein unwritten or erased cells can be rewritten at any time, but wherein the erasing procedure of the cells is only possible in sectors. The control units frequently have a diagnostic interface, by means of which the control unit can be coupled to a vehicle independent diagnostic and/or test device. When reprogramming the control units, a new version of the control unit software, for example, a firmware program, is always loaded into the control unit by means of the diagnostic and/or test device.
The increasing functionality of the control units and the ever-growing number of different control units will lead to a significant increase in the number of software variants that have to be made available to the motor vehicle or more specifically to the control units.
The object of the present invention is to provide a control unit for a motor vehicle, a programming unit and a programming system, all of which facilitate a flexible and/or reliable programming of the control unit.
This and other objects are achieved, according to a first aspect of the invention, by a control unit that is designed for a motor vehicle and has a central processing unit, wherein the central processing unit is designed to execute one or more control programs. Furthermore, the control unit comprises at least one communication interface for transmitting and receiving data and a program memory for storing the program data of the respective control programs. The control unit is designed to evaluate a program data update request for at least one control program that is to be updated, wherein said program data update request is provided at the communication interface. For this purpose the program data update request includes at least one address of an external data source, which is independent of the control unit and from which the respective current program data of the control program to be updated can be requested. Furthermore, the control unit is designed to output a program data request for the respective current program data to the external data source over the communication interface and/or over a second communication interface. Furthermore, the control unit is designed to read in the program data of the respective control programs, which are present at the communication interface and/or the second communication interface in response to the program data request, and to store said program data in the program memory.
The advantage of this feature is that it facilitates a very flexible programming of the control unit. In this case the term “programming” should be construed in the sense of incorporating one or more control programs in the control unit in such a way that the control unit can execute the respective control program. The program data of the control programs that are necessary for the programming of the respective control units can be provided by various sources. This arrangement makes it possible for a plurality of control units to be programmed very fast simultaneously, because the data do not have to be provided solely by one source and/or by means of one source, for example, a suitably designed programming unit.
In one advantageous embodiment the control unit comprises a memory management unit. The memory management unit is designed to determine a memory area for the program data of the respective control programs that are read in over the communication interface and/or the second communication interface. Furthermore, the memory management unit is designed to store the program data in the determined memory area and to make the program data available to the central processing unit for execution.
The advantage of this feature is that it facilitates a flexible management of the memory units of the control unit. In this case the determining procedure of the memory area and the storing procedure of the program data can also include that the control unit is designed to execute additional steps in preparation and/or post-preparation of storing and/or providing program data, for example an initialization, an indexing and/or a marking of the configuration data. The control unit can control the storage of the program data, as a function of a free memory capacity and/or the memory configuration, for example as a flash memory or a random access memory. The storage of the program data can be performed independently of a memory control function by means of the data source that provides the program data, for example, independently of the programming unit. It is not necessary that the data source and/or the programming unit know the memory configuration of the relevant control unit and/or are suitably designed to determine the memory configuration of the control unit. Owing to the plethora of different control units such a feature can make a significant contribution to cutting the costs, in particular, during maintenance of the control units.
Furthermore, the design of the control unit with a memory management unit has the advantage that, for example, the program data can be modified and/or expanded prior to transmission to the control unit in such a way that the transmission can be executed reliably and/or faster. In the control unit the program data can be converted back into their original format, using the memory management and/or other modules. For example, the program data can be transmitted in encoded form. The control unit can be designed to execute a plurality of control programs virtually in parallel. The control programs can be executed at different run times, at least to some extent, i.e., at different times and for different periods of time, as a function, for example, of a predetermined priority for the respective control program. In this case the memory management can be configured to make the respective program data available to the central processing unit for execution at the run times of the respective control program. The run times can be determined, for example, as a function of the priorities.
In one additional advantageous embodiment the control unit is designed to support a specified set of protocols for the programming of the control unit with the program data that are stored in a specified way in the program memory. The control unit is designed to read in and evaluate an additional program data update request for at least one control program that is to be updated and that is provided at the communication interface. In this case the additional program data update request includes at least a first indicator that represents the possible protocols that can be used for the programming with the updated program data of the respective control program. Furthermore, the control unit is designed, depending on the first indicator in each case, to determine a second indicator that represents the protocol from the set of protocols that is to be used for the programming of the control unit with the program data of the control program that is to be updated. The control unit is designed to send an additional program data request, which includes the second indicator, over the communication interface in response to the additional program data update request.
One possible protocol that can be used for the programming of the control unit is the unified diagnostic services protocol (UDS protocol). The UDS protocol is a communication protocol that was developed for motor vehicles and that facilitates communication between the respective control unit and a unit that is located outside the vehicle. For this purpose the respective motor vehicle may have a diagnostic interface, which allows the unit to be coupled to a data bus of the vehicle. With this arrangement it is possible, for example, to query a fault memory of the respective control unit and/or to load one or more control programs, in particular, a current firmware into the program memory. The UDS protocol can be used for simpler control units, which have, for example, a microcontroller and/or are designed as an embedded system.
With the increasing functionality and complexity of the control units, which have, for example, one or more processors and/or have a different program memory structure, it may be necessary to use other protocols for the programming of the control unit, in order to make reliable programming possible. One instruction of the protocol by means of the control unit makes it possible that the protocol can be suitably selected as a function of a given hardware and software platform of the control unit, so that a reliable, flexible and/or fast programming of the control unit is possible. At the same time the control unit can be designed to receive the program data directly from a suitably designed programming unit, which is coupled to the control unit over the communication interface, and/or to download or request said program data from an external data source by using an address for establishing a connection between the control unit and the external data source. The program data update request and the additional program data update request can also be combined together into one request. Even the program data request and the additional program data request can be combined together into one request.
In an additional advantageous embodiment the control unit is designed to detect the program data, which are compressed in a defined manner and which are read in over the communication interface and/or the second communication interface, as such and to decompress said compressed program data. This feature has the advantage that the period of time that it takes to transmit the program data to the control unit can be shortened. The compression has the advantage that the amount of data to be transmitted for the program data is much smaller. This feature can help to reduce the probability of an error during the transmission.
In another advantageous embodiment the control unit is designed to detect a container file, which is composed of one or more data files with program data and which is read in over the communication interface and/or the second communication interface, as such and to extract the data files from the container file. This arrangement allows that the data can be transmitted in compressed form. As an alternative or in addition, the container file can be encrypted and/or can be transmitted in such a way that said container file is protected by means of a password.
According to a second aspect of the invention, a programming unit is provided for at least one control unit of a motor vehicle. The programming unit has an additional communication interface, by means of which the programming unit can be coupled to the respective control unit. The programming unit is designed to query a program version of at least one control program of the respective control unit, to which it is coupled; and, when said programming unit detects that said at least one control program is not stored in a specified program version in the control unit, the programming unit is designed to send a program data update request to the respective control unit over the additional communication interface. For this purpose the program data update request includes at least one address of an external data source, which is independent of the control unit and from which the respective current program data of the control program to be updated can be requested.
In this case the programming unit can be designed to query the program version directly from the control unit and/or to request a transmission of the content of a specified memory area directly from the control unit.
In one advantageous embodiment the programming unit is designed to send an additional program data update request for at least the one control program, which is to be updated, to the respective control unit over the additional communication interface, when the programming unit detects that the at least one control program is not stored in a specified program version in the control unit. For this purpose the additional program data update request includes at least a first indicator that represents the possible protocols that can be used for the programming with the updated program data of the respective control program. Furthermore, the programming unit is designed to evaluate an additional program data request, which is provided at the additional communication interface in response to the additional program data update request. In this case the additional program data request includes a second indicator, which represents a protocol selected by the respective control unit. Furthermore, the programming unit is designed to provide indirectly and/or directly, depending on the evaluation results, the programming with the current program data according to the protocol that is currently selected.
When the program data are provided directly, the program data are provided by the programming unit and are sent to the control unit. When the program data are provided indirectly, the programming unit informs the control unit of an address of a data source, from which the control unit can request and/or download the program data.
In an additional advantageous embodiment the programming unit is designed to compress the program data in a defined manner and to send the compressed data to the respective control unit over the additional communication interface. The compression has the advantage that the amount of data to be transmitted for the program data is significantly smaller. This feature may help to decrease the probability of an error during transmission and to reduce the transmission time.
In another advantageous embodiment the programming unit is designed to combine one or more data files, each of which is composed of program data, together into one container file and to send the one container file over the additional communication interface to the respective control unit. This feature allows that the data can be transmitted to the respective control units in compressed form. As an alternative or in addition, the container file can be transmitted encrypted and/or can be transmitted password-protected.
According to a third aspect of the invention, a programming system is provided which includes at least one control unit according to the first aspect, and a programming unit according to the second aspect, wherein the programming unit is coupled to the respective control unit. In this case advantageous embodiments of the first and second aspects also apply to the third aspect.
Other objects, advantages and novel features of the present invention will become apparent from the following detailed description of one or more preferred embodiments when considered in conjunction with the accompanying drawing.